package com.heima.article.xxljob;

import com.heima.article.service.HotArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class HandleJob {
    @Autowired
    private HotArticleService hotArticleService;
    @XxlJob("computeHotArticleJob")
    public void computeHotArticleJob() {
        hotArticleService.computeHotArticle();
    }
    @XxlJob("sampleJob")
    public void sampleJob() {
        System.out.println("sampleJob");
    }
}
